package com.TTBook.core.category.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BookCategoryCriteria {
    protected String orderByClause;

    protected List oredCriteria;

    public BookCategoryCriteria() {
        oredCriteria = new ArrayList();
    }

    protected BookCategoryCriteria(BookCategoryCriteria example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public List getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ts_book_category
     *
     *  Wed Oct 16 00:23:24 CST 2013
     */
    public void clear() {
        oredCriteria.clear();
    }

    public static class Criteria {
        protected List criteriaWithoutValue;

        protected List criteriaWithSingleValue;

        protected List criteriaWithListValue;

        protected List criteriaWithBetweenValue;

        protected Criteria() {
            super();
            criteriaWithoutValue = new ArrayList();
            criteriaWithSingleValue = new ArrayList();
            criteriaWithListValue = new ArrayList();
            criteriaWithBetweenValue = new ArrayList();
        }

        public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                || criteriaWithSingleValue.size() > 0
                || criteriaWithListValue.size() > 0
                || criteriaWithBetweenValue.size() > 0;
        }

        public List getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public List getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public List getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public List getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition, List values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            List list = new ArrayList();
            list.add(value1);
            list.add(value2);
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        public Criteria andBookCatIdIsNull() {
            addCriterion("BOOK_CAT_ID is null");
            return this;
        }

        public Criteria andBookCatIdIsNotNull() {
            addCriterion("BOOK_CAT_ID is not null");
            return this;
        }

        public Criteria andBookCatIdEqualTo(String value) {
            addCriterion("BOOK_CAT_ID =", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotEqualTo(String value) {
            addCriterion("BOOK_CAT_ID <>", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdGreaterThan(String value) {
            addCriterion("BOOK_CAT_ID >", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdGreaterThanOrEqualTo(String value) {
            addCriterion("BOOK_CAT_ID >=", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdLessThan(String value) {
            addCriterion("BOOK_CAT_ID <", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdLessThanOrEqualTo(String value) {
            addCriterion("BOOK_CAT_ID <=", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdLike(String value) {
            addCriterion("BOOK_CAT_ID like", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotLike(String value) {
            addCriterion("BOOK_CAT_ID not like", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdIn(List values) {
            addCriterion("BOOK_CAT_ID in", values, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotIn(List values) {
            addCriterion("BOOK_CAT_ID not in", values, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdBetween(String value1, String value2) {
            addCriterion("BOOK_CAT_ID between", value1, value2, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotBetween(String value1, String value2) {
            addCriterion("BOOK_CAT_ID not between", value1, value2, "bookCatId");
            return this;
        }

        public Criteria andCatNameIsNull() {
            addCriterion("CAT_NAME is null");
            return this;
        }

        public Criteria andCatNameIsNotNull() {
            addCriterion("CAT_NAME is not null");
            return this;
        }

        public Criteria andCatNameEqualTo(String value) {
            addCriterion("CAT_NAME =", value, "catName");
            return this;
        }

        public Criteria andCatNameNotEqualTo(String value) {
            addCriterion("CAT_NAME <>", value, "catName");
            return this;
        }

        public Criteria andCatNameGreaterThan(String value) {
            addCriterion("CAT_NAME >", value, "catName");
            return this;
        }

        public Criteria andCatNameGreaterThanOrEqualTo(String value) {
            addCriterion("CAT_NAME >=", value, "catName");
            return this;
        }

        public Criteria andCatNameLessThan(String value) {
            addCriterion("CAT_NAME <", value, "catName");
            return this;
        }

        public Criteria andCatNameLessThanOrEqualTo(String value) {
            addCriterion("CAT_NAME <=", value, "catName");
            return this;
        }

        public Criteria andCatNameLike(String value) {
            addCriterion("CAT_NAME like", value, "catName");
            return this;
        }

        public Criteria andCatNameNotLike(String value) {
            addCriterion("CAT_NAME not like", value, "catName");
            return this;
        }

        public Criteria andCatNameIn(List values) {
            addCriterion("CAT_NAME in", values, "catName");
            return this;
        }

        public Criteria andCatNameNotIn(List values) {
            addCriterion("CAT_NAME not in", values, "catName");
            return this;
        }

        public Criteria andCatNameBetween(String value1, String value2) {
            addCriterion("CAT_NAME between", value1, value2, "catName");
            return this;
        }

        public Criteria andCatNameNotBetween(String value1, String value2) {
            addCriterion("CAT_NAME not between", value1, value2, "catName");
            return this;
        }

        public Criteria andParentCatIdIsNull() {
            addCriterion("PARENT_CAT_ID is null");
            return this;
        }

        public Criteria andParentCatIdIsNotNull() {
            addCriterion("PARENT_CAT_ID is not null");
            return this;
        }

        public Criteria andParentCatIdEqualTo(String value) {
            addCriterion("PARENT_CAT_ID =", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdNotEqualTo(String value) {
            addCriterion("PARENT_CAT_ID <>", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdGreaterThan(String value) {
            addCriterion("PARENT_CAT_ID >", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdGreaterThanOrEqualTo(String value) {
            addCriterion("PARENT_CAT_ID >=", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdLessThan(String value) {
            addCriterion("PARENT_CAT_ID <", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdLessThanOrEqualTo(String value) {
            addCriterion("PARENT_CAT_ID <=", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdLike(String value) {
            addCriterion("PARENT_CAT_ID like", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdNotLike(String value) {
            addCriterion("PARENT_CAT_ID not like", value, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdIn(List values) {
            addCriterion("PARENT_CAT_ID in", values, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdNotIn(List values) {
            addCriterion("PARENT_CAT_ID not in", values, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdBetween(String value1, String value2) {
            addCriterion("PARENT_CAT_ID between", value1, value2, "parentCatId");
            return this;
        }

        public Criteria andParentCatIdNotBetween(String value1, String value2) {
            addCriterion("PARENT_CAT_ID not between", value1, value2, "parentCatId");
            return this;
        }

        public Criteria andCatSerNumIsNull() {
            addCriterion("CAT_SER_NUM is null");
            return this;
        }

        public Criteria andCatSerNumIsNotNull() {
            addCriterion("CAT_SER_NUM is not null");
            return this;
        }

        public Criteria andCatSerNumEqualTo(Integer value) {
            addCriterion("CAT_SER_NUM =", value, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumNotEqualTo(Integer value) {
            addCriterion("CAT_SER_NUM <>", value, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumGreaterThan(Integer value) {
            addCriterion("CAT_SER_NUM >", value, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("CAT_SER_NUM >=", value, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumLessThan(Integer value) {
            addCriterion("CAT_SER_NUM <", value, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumLessThanOrEqualTo(Integer value) {
            addCriterion("CAT_SER_NUM <=", value, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumIn(List values) {
            addCriterion("CAT_SER_NUM in", values, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumNotIn(List values) {
            addCriterion("CAT_SER_NUM not in", values, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumBetween(Integer value1, Integer value2) {
            addCriterion("CAT_SER_NUM between", value1, value2, "catSerNum");
            return this;
        }

        public Criteria andCatSerNumNotBetween(Integer value1, Integer value2) {
            addCriterion("CAT_SER_NUM not between", value1, value2, "catSerNum");
            return this;
        }

        public Criteria andCatGradeIsNull() {
            addCriterion("CAT_GRADE is null");
            return this;
        }

        public Criteria andCatGradeIsNotNull() {
            addCriterion("CAT_GRADE is not null");
            return this;
        }

        public Criteria andCatGradeEqualTo(Integer value) {
            addCriterion("CAT_GRADE =", value, "catGrade");
            return this;
        }

        public Criteria andCatGradeNotEqualTo(Integer value) {
            addCriterion("CAT_GRADE <>", value, "catGrade");
            return this;
        }

        public Criteria andCatGradeGreaterThan(Integer value) {
            addCriterion("CAT_GRADE >", value, "catGrade");
            return this;
        }

        public Criteria andCatGradeGreaterThanOrEqualTo(Integer value) {
            addCriterion("CAT_GRADE >=", value, "catGrade");
            return this;
        }

        public Criteria andCatGradeLessThan(Integer value) {
            addCriterion("CAT_GRADE <", value, "catGrade");
            return this;
        }

        public Criteria andCatGradeLessThanOrEqualTo(Integer value) {
            addCriterion("CAT_GRADE <=", value, "catGrade");
            return this;
        }

        public Criteria andCatGradeIn(List values) {
            addCriterion("CAT_GRADE in", values, "catGrade");
            return this;
        }

        public Criteria andCatGradeNotIn(List values) {
            addCriterion("CAT_GRADE not in", values, "catGrade");
            return this;
        }

        public Criteria andCatGradeBetween(Integer value1, Integer value2) {
            addCriterion("CAT_GRADE between", value1, value2, "catGrade");
            return this;
        }

        public Criteria andCatGradeNotBetween(Integer value1, Integer value2) {
            addCriterion("CAT_GRADE not between", value1, value2, "catGrade");
            return this;
        }

        public Criteria andIconPathIsNull() {
            addCriterion("ICON_PATH is null");
            return this;
        }

        public Criteria andIconPathIsNotNull() {
            addCriterion("ICON_PATH is not null");
            return this;
        }

        public Criteria andIconPathEqualTo(String value) {
            addCriterion("ICON_PATH =", value, "iconPath");
            return this;
        }

        public Criteria andIconPathNotEqualTo(String value) {
            addCriterion("ICON_PATH <>", value, "iconPath");
            return this;
        }

        public Criteria andIconPathGreaterThan(String value) {
            addCriterion("ICON_PATH >", value, "iconPath");
            return this;
        }

        public Criteria andIconPathGreaterThanOrEqualTo(String value) {
            addCriterion("ICON_PATH >=", value, "iconPath");
            return this;
        }

        public Criteria andIconPathLessThan(String value) {
            addCriterion("ICON_PATH <", value, "iconPath");
            return this;
        }

        public Criteria andIconPathLessThanOrEqualTo(String value) {
            addCriterion("ICON_PATH <=", value, "iconPath");
            return this;
        }

        public Criteria andIconPathLike(String value) {
            addCriterion("ICON_PATH like", value, "iconPath");
            return this;
        }

        public Criteria andIconPathNotLike(String value) {
            addCriterion("ICON_PATH not like", value, "iconPath");
            return this;
        }

        public Criteria andIconPathIn(List values) {
            addCriterion("ICON_PATH in", values, "iconPath");
            return this;
        }

        public Criteria andIconPathNotIn(List values) {
            addCriterion("ICON_PATH not in", values, "iconPath");
            return this;
        }

        public Criteria andIconPathBetween(String value1, String value2) {
            addCriterion("ICON_PATH between", value1, value2, "iconPath");
            return this;
        }

        public Criteria andIconPathNotBetween(String value1, String value2) {
            addCriterion("ICON_PATH not between", value1, value2, "iconPath");
            return this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("STATUS is null");
            return this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("STATUS is not null");
            return this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion("STATUS =", value, "status");
            return this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion("STATUS <>", value, "status");
            return this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion("STATUS >", value, "status");
            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion("STATUS >=", value, "status");
            return this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion("STATUS <", value, "status");
            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion("STATUS <=", value, "status");
            return this;
        }

        public Criteria andStatusLike(String value) {
            addCriterion("STATUS like", value, "status");
            return this;
        }

        public Criteria andStatusNotLike(String value) {
            addCriterion("STATUS not like", value, "status");
            return this;
        }

        public Criteria andStatusIn(List values) {
            addCriterion("STATUS in", values, "status");
            return this;
        }

        public Criteria andStatusNotIn(List values) {
            addCriterion("STATUS not in", values, "status");
            return this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion("STATUS between", value1, value2, "status");
            return this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion("STATUS not between", value1, value2, "status");
            return this;
        }
    }
}